package com.hsh.gaoqianlianmeng.domain;

import com.hsh.gaoqianlianmeng.anno.Alia;
import com.hsh.gaoqianlianmeng.anno.SheetInfo;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 拼多多 批量发货
 */
@Data
@SheetInfo(headerRowIndex = 1)
@NoArgsConstructor
public class PDDImport {
    @Alia("order_sn")
    public String no;
    @Alia("shipping_name")
    public String expressCompany;
    @Alia("shipping_sn")
    public String expressNum;


    public PDDImport(YangExport yangExport) {
        this.no = yangExport.no;
        String type = yangExport.getType();
        if ("CC".equals(type)) {
            this.expressCompany = "洋包裹";
            this.expressNum = yangExport.getYangExpressNum();
        } else if ("HNCC".equals(type)) {
//            this.expressCompany = yangExport.getExpressCompany();
            this.expressCompany = "韵达快递";
            this.expressNum = yangExport.getExpressNum();
        }
    }
}
